<?php

function parse_domain_name($url) {
	$r = array();
	if(preg_match('/(https?:\/\/)?([\w\.\-]+)/', $url . ' ', $r)){
		return $r[2];
	}
	return null;
}